<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>添加信息</title>
    <link rel="stylesheet" href="layui.css" media="all">
    <link rel="stylesheet" href="/css/font.css">
    <link rel="stylesheet" href="/css/xadmin.css">
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <script src="/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/js/xadmin.js"></script>

</head>
<body>
<div class="layui-fluid">
    <div class="layui-col-md-offset4" >
    <tr th:if="${getCustName!=null}" >
        <p th:text="${msg}" ></p>
        <p th:text="${msg3}"></p>
        <div style="margin-top: 20px"  >
        <a class="layui-btn layui-btn-small" id="shuaxin">点击刷新此页面</a>
        </div>
    </tr>
    </div>
    <div class="layui-col-md-offset4"  >
    <tr th:unless="${getCustName!=null}">
        <div style="margin-bottom: 20px">
        <p th:text="${msg}" class="layui-col-md-offset1"></p>
        </div>
        <div>
    <form class="layui-form" id="test" action="#" th:action="@{/user-addCust}" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">用户名</label>
        <div class="layui-input-inline">
            <input type="text" readonly="readonly" name="title" required  lay-verify="required" autocomplete="off" class="layui-input" th:value="${session.username}" >
<!--            <th th:text="${session.username}"></th>-->
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline">
            <input type="text" name="custName" required lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
        </div>
    </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号</label>
            <div class="layui-input-inline">
                <input type="text" name="custPhone" required lay-verify="required" placeholder="请输入手机号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">身份号</label>
            <div class="layui-input-inline">
                <input type="text" name="custNum" required lay-verify="required" placeholder="请输入身份号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="radio" name="sex" value="男" title="男">
                <input type="radio" name="sex" value="女" title="女" checked>
            </div>
        </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo" >立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>

</form>
        </div>
    </tr>
    </div>
</div>
<script type='text/javascript'>
    var shuaxin = document.getElementById("shuaxin");
    shuaxin.onclick = function () {
        window.parent.location.reload();
    }
</script>
<script>
    var form = layui.form;
    layui.use('form', function(){
        // $("#add").click(function (){
        //     layer.msg('添加成功', {
        //         time: 0 //不自动关闭
        //         ,btn: '确定'
        //         ,yes:function(){
        //             window.parent.location.reload();
        //         }
        //     })
        // });

    });

</script>
</body>
</html>

